import socket

sk = socket.socket()

print(sk)
Tp=open('ipinfo.dll','r')
address = (Tp.read(),8000)

sk.connect(address)

p=open('paint.txt','r')
while 1:
    k=p.read()
    if k=='' :
        break
    #data = sk.recv(1024)#收到的为bytes类型
    print('send',k)
    data = sk.send(bytes(k, 'utf8'))
    #print(str(data, 'utf8'))
print('end')
